package org.lan.permission.dao.impl;

import org.lan.basic.impl.BaseDao;
import org.lan.permission.dao.IUserDao;
import org.lan.permission.entity.User;
import org.springframework.stereotype.Repository;

@Repository
public class UserDao extends BaseDao<User>implements IUserDao {

	@Override
	public User findByUsernameAndPassword(String username, String password) {
		String hql = "SELECT u FROM User u WHERE u.username = ? AND u.password = ?";
		return (User) query(hql, username, password);
	}

}
